package hu.uniobuda.nik.openday;

import hu.uniobuda.nik.openday.utils.Config;
import hu.uniobuda.nik.openday.utils.Utils;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class SocialActivity extends Activity {

	Button socialFacebook,
		   socialGPlus,
		   socialTwitter,
		   socialYoutube,
		   socialMarket;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.social);		
		
		socialFacebook = (Button)findViewById(R.id.socialFacebook);
		socialFacebook.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				Utils.openInBrowser(SocialActivity.this, Config.URL_FACEBOOK);
			}
		});
		
		socialGPlus = (Button)findViewById(R.id.socialGPlus);
		socialGPlus.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				Utils.openInBrowser(SocialActivity.this, Config.URL_GPLUS);
			}
		});
		
		socialTwitter = (Button)findViewById(R.id.socialTwitter);
		socialTwitter.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				Utils.openInBrowser(SocialActivity.this, Config.URL_TWITTER);
			}
		});
		
		socialYoutube = (Button)findViewById(R.id.socialYoutube);
		socialYoutube.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				Utils.openInBrowser(SocialActivity.this, Config.URL_YOUTUBE);
			}
		});
		
		socialMarket = (Button)findViewById(R.id.socialMarket);
		socialMarket.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				Utils.openInAnywhere(SocialActivity.this, Config.URL_MARKET);
			}
		});
	}
	
}
